import React, { useEffect } from "react";

export interface IReactDocumentTitle {
  title: string,

}

const ReactDocumentTitle: React.FC<IReactDocumentTitle> = ({title, children}) => {
  useEffect(() => {
    document.title = title;
  }, [title]);

  return <>{children}</>;
};

export default ReactDocumentTitle;
